/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80012
 Source Host           : localhost:3306
 Source Schema         : test

 Target Server Type    : MySQL
 Target Server Version : 80012
 File Encoding         : 65001

 Date: 23/11/2018 10:53:22
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for T_ATTACHMENT
-- ----------------------------
DROP TABLE IF EXISTS `T_ATTACHMENT`;
CREATE TABLE `T_ATTACHMENT` (
  `ATTACHMENT_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '附件ID',
  `ATTACHMENT_CODE` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '附件编号',
  `ATTACHMENT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '附件名称',
  `ATTACHMENT_PATH` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '附件路径',
  `ATTACHMENT_SIZE` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '附件大小',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ATTACHMENT_ID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='附件表';

-- ----------------------------
-- Records of T_ATTACHMENT
-- ----------------------------
BEGIN;
INSERT INTO `T_ATTACHMENT` VALUES (154, '103fb9e2a41a4851b1b85fa74200d365', 'PMP答题套路及关键词+-+现代卓越.pdf', '/Users/ghy/Desktop/test/PMP答题套路及关键词+-+现代卓越.pdf', '647 KB', '49', '2018-11-23 10:25:56');
INSERT INTO `T_ATTACHMENT` VALUES (156, 'admin', 'jQuery-File-Upload-9.27.0.zip', '/Users/ghy/Desktop/test/jQuery-File-Upload-9.27.0.zip', '123 KB', '49', '2018-11-23 10:30:29');
INSERT INTO `T_ATTACHMENT` VALUES (157, '525b2ad4a3dc4aba942069a0d4ffb1a4', 'jQuery-File-Upload-9.27.0.zip', '/Users/ghy/Desktop/test/jQuery-File-Upload-9.27.0.zip', '123 KB', '50', '2018-11-23 10:31:27');
INSERT INTO `T_ATTACHMENT` VALUES (158, '525b2ad4a3dc4aba942069a0d4ffb1a4', 'Jietu20180906-123750.png', '/Users/ghy/Desktop/test/Jietu20180906-123750.png', '218 KB', '50', '2018-11-23 10:31:27');
INSERT INTO `T_ATTACHMENT` VALUES (159, '525b2ad4a3dc4aba942069a0d4ffb1a4', 'jqPaginator-master.zip', '/Users/ghy/Desktop/test/jqPaginator-master.zip', '49.0 KB', '50', '2018-11-23 10:31:27');
COMMIT;

-- ----------------------------
-- Table structure for T_ATTACHMENT_CATALOGUE
-- ----------------------------
DROP TABLE IF EXISTS `T_ATTACHMENT_CATALOGUE`;
CREATE TABLE `T_ATTACHMENT_CATALOGUE` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `ATTACHMENT_ID` int(11) DEFAULT NULL COMMENT '附件ID',
  `CATALOGUE_ID` int(11) DEFAULT NULL COMMENT '目录ID',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='附件目录表';

-- ----------------------------
-- Records of T_ATTACHMENT_CATALOGUE
-- ----------------------------
BEGIN;
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (2, 99, 1, '50', '2018-11-22 16:10:18');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (3, 100, 1, '49', '2018-11-23 09:07:20');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (4, 101, 1, '49', '2018-11-23 09:14:33');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (5, 102, 1, '49', '2018-11-23 09:15:19');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (6, 103, 1, '49', '2018-11-23 09:15:45');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (7, 104, 1, '49', '2018-11-23 09:15:56');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (8, 105, 1, '49', '2018-11-23 09:25:51');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (9, 106, 1, '49', '2018-11-23 09:27:46');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (10, 151, 2, '49', '2018-11-23 10:24:43');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (11, 152, 2, '49', '2018-11-23 10:24:43');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (12, 153, 2, '49', '2018-11-23 10:24:43');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (13, 154, 2, '49', '2018-11-23 10:25:58');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (14, 155, 1, '49', '2018-11-23 10:29:33');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (15, 156, 3, '49', '2018-11-23 10:30:30');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (16, 157, 1, '50', '2018-11-23 10:31:27');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (17, 158, 1, '50', '2018-11-23 10:31:27');
INSERT INTO `T_ATTACHMENT_CATALOGUE` VALUES (18, 159, 1, '50', '2018-11-23 10:31:27');
COMMIT;

-- ----------------------------
-- Table structure for T_CATALOGUE
-- ----------------------------
DROP TABLE IF EXISTS `T_CATALOGUE`;
CREATE TABLE `T_CATALOGUE` (
  `CATALOGUE_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '目录ID',
  `CATALOGUE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '目录名称',
  `CREATER` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`CATALOGUE_ID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='目录表';

-- ----------------------------
-- Records of T_CATALOGUE
-- ----------------------------
BEGIN;
INSERT INTO `T_CATALOGUE` VALUES (1, '私有', NULL, NULL);
INSERT INTO `T_CATALOGUE` VALUES (2, '公有', NULL, NULL);
INSERT INTO `T_CATALOGUE` VALUES (3, '工程师', NULL, NULL);
INSERT INTO `T_CATALOGUE` VALUES (4, '承包人', NULL, NULL);
INSERT INTO `T_CATALOGUE` VALUES (5, '管理层', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for T_EMAIL
-- ----------------------------
DROP TABLE IF EXISTS `T_EMAIL`;
CREATE TABLE `T_EMAIL` (
  `EMAIL_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '邮件ID',
  `EMAIL_ADDRESS` varchar(2000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '邮箱地址',
  `EMAIL_SUBJECT` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '邮件主题',
  `EMAIL_CONTENT` longtext CHARACTER SET utf8 COLLATE utf8_bin COMMENT '邮件正文',
  `EMAIL_ATTACHMENT` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '邮件附件',
  `IS_ONCE` varchar(1) COLLATE utf8_bin DEFAULT NULL COMMENT '连接是否一次有效（0：否，1：是）',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`EMAIL_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='邮件表';

-- ----------------------------
-- Records of T_EMAIL
-- ----------------------------
BEGIN;
INSERT INTO `T_EMAIL` VALUES (19, 'gaohaiyang_cn@163.com', '附件发送测试', '\r\n                                            <h2>hAdmin后台主题</h2>\r\n                                            <p>，她提供了诸多的强大的可以重新组合的UI组件，并集成了最新的jQuery版本，当然，也集成了很多功能强大，用途广泛的国内外jQuery插件及其他组件，她可以用于所有的Web应用程序，如<b>网站管理后台</b>，<b>网站会员中心</b>，<b>CMS</b>，<b>CRM</b>，<b>OA</b>等等，当然，您也可以对她进行深度定制，以做出更强系统。</p>\r\n                                            <p></p>\r\n                                        <br/>附件下载地址：<a href=http://localhost:8088/hgt/attachment/download/20552f16972b47b8bf12adba94e6fdff>http://localhost:8088/hgt/attachment/download/20552f16972b47b8bf12adba94e6fdff</a>', NULL, NULL, '50', '2018-11-22 16:10:22');
INSERT INTO `T_EMAIL` VALUES (20, 'gaohaiyang_cn@163.com', '测试', '\r\n                                            <h2>hAdmin后台主题</h2>\r\n                                            <p>，她提供了诸多的强大的可以重新组合的UI组件，并集成了最新的jQuery版本，当然，也集成了很多功能强大，用途广泛的国内外jQuery插件及其他组件，她可以用于所有的Web应用程序，如<b>网站管理后台</b>，<b>网站会员中心</b>，<b>CMS</b>，<b>CRM</b>，<b>OA</b>等等，当然，您也可以对她进行深度定制，以做出更强系统。</p>\r\n                                            <p></p>\r\n                                        <br/>附件下载地址：<a href=http://localhost:8088/hgt/attachment/download/525b2ad4a3dc4aba942069a0d4ffb1a4>http://localhost:8088/hgt/attachment/download/525b2ad4a3dc4aba942069a0d4ffb1a4</a>', NULL, NULL, '50', '2018-11-23 10:31:33');
COMMIT;

-- ----------------------------
-- Table structure for T_EMAIL_ATTACHMENT
-- ----------------------------
DROP TABLE IF EXISTS `T_EMAIL_ATTACHMENT`;
CREATE TABLE `T_EMAIL_ATTACHMENT` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `EMAIL_ID` int(11) DEFAULT NULL COMMENT '邮件主键',
  `ATTACHMENT_CODE` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '附件编码',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='邮件附件中间表';

-- ----------------------------
-- Records of T_EMAIL_ATTACHMENT
-- ----------------------------
BEGIN;
INSERT INTO `T_EMAIL_ATTACHMENT` VALUES (1, 18, '3b9474089b2b4bc4b1337e1163e33dec', '49', '2018-11-16 11:03:30');
INSERT INTO `T_EMAIL_ATTACHMENT` VALUES (2, 19, '20552f16972b47b8bf12adba94e6fdff', '50', '2018-11-22 16:10:22');
INSERT INTO `T_EMAIL_ATTACHMENT` VALUES (3, 20, '525b2ad4a3dc4aba942069a0d4ffb1a4', '50', '2018-11-23 10:31:33');
COMMIT;

-- ----------------------------
-- Table structure for T_LOG
-- ----------------------------
DROP TABLE IF EXISTS `T_LOG`;
CREATE TABLE `T_LOG` (
  `LOG_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
  `MODEL_NAME` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '模块名称',
  `METHOD_TYPE` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '方法类型',
  `METHOD_NAME` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '方法名称',
  `METHOD_DESC` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '方法描述',
  `METHOD_URL` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '方法请求路径',
  `IP` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '操作者ip',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`LOG_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='日志表';

-- ----------------------------
-- Table structure for T_NEWS
-- ----------------------------
DROP TABLE IF EXISTS `T_NEWS`;
CREATE TABLE `T_NEWS` (
  `NEWS_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '新闻ID',
  `NEW_TITLE` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '新闻标题',
  `NEW_CONTENT` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '新闻内容',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`NEWS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='新闻表';

-- ----------------------------
-- Table structure for T_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `T_ROLE`;
CREATE TABLE `T_ROLE` (
  `ROLE_ID` int(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `ROLE_CODE` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '角色编号',
  `ROLE_NAME` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '角色名称',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ROLE_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='角色表';

-- ----------------------------
-- Records of T_ROLE
-- ----------------------------
BEGIN;
INSERT INTO `T_ROLE` VALUES (1, 'ROLE_ADMIN', '系统管理员', NULL, NULL);
INSERT INTO `T_ROLE` VALUES (2, 'ROLE_ENGINEER', '工程师', NULL, NULL);
INSERT INTO `T_ROLE` VALUES (3, 'ROLE_ASSURER', '承保人', NULL, NULL);
INSERT INTO `T_ROLE` VALUES (4, 'ROLE_MANAGER', '管理层', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for T_ROLE_CATALOGUE
-- ----------------------------
DROP TABLE IF EXISTS `T_ROLE_CATALOGUE`;
CREATE TABLE `T_ROLE_CATALOGUE` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `ROLE_ID` int(11) DEFAULT NULL COMMENT '角色ID',
  `CATALOGUE_ID` int(11) DEFAULT NULL COMMENT '目录ID',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='角色目录中间表';

-- ----------------------------
-- Records of T_ROLE_CATALOGUE
-- ----------------------------
BEGIN;
INSERT INTO `T_ROLE_CATALOGUE` VALUES (13, 2, 1, '49', '2018-11-18 17:22:00');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (14, 2, 2, '49', '2018-11-18 17:22:00');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (15, 2, 3, '49', '2018-11-18 17:22:00');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (16, 3, 1, '49', '2018-11-18 17:22:06');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (17, 3, 2, '49', '2018-11-18 17:22:06');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (18, 3, 4, '49', '2018-11-18 17:22:06');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (19, 4, 1, '49', '2018-11-18 17:22:12');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (20, 4, 2, '49', '2018-11-18 17:22:12');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (21, 4, 5, '49', '2018-11-18 17:22:12');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (27, 1, 1, '49', '2018-11-18 17:22:26');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (28, 1, 2, '49', '2018-11-18 17:22:26');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (29, 1, 3, '49', '2018-11-18 17:22:26');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (30, 1, 4, '49', '2018-11-18 17:22:26');
INSERT INTO `T_ROLE_CATALOGUE` VALUES (31, 1, 5, '49', '2018-11-18 17:22:26');
COMMIT;

-- ----------------------------
-- Table structure for T_USER
-- ----------------------------
DROP TABLE IF EXISTS `T_USER`;
CREATE TABLE `T_USER` (
  `USER_ID` int(36) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `USERNAME` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '用户名',
  `FIRST_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '姓氏',
  `LAST_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '名字',
  `EMAIL_ADDRESS` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮件地址',
  `PASSWORD` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密码',
  `PIN` int(6) DEFAULT NULL COMMENT 'PIN码',
  `PIN_STATE` int(1) DEFAULT NULL COMMENT 'PIN是否启用（0否，1是）',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`USER_ID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='用户表';

-- ----------------------------
-- Records of T_USER
-- ----------------------------
BEGIN;
INSERT INTO `T_USER` VALUES (49, 'admin', 'gao', 'haiyang', 'gaohy@huilan.com', '2da875efdd3f8d95805226a2c8e531f2', 123456, NULL, '111', '2018-11-07 11:52:30');
INSERT INTO `T_USER` VALUES (50, 'test', 'zhang', 'fei', 'gaohaiyang_cn@163.com', 'e10adc3949ba59abbe56e057f20f883e', 123456, NULL, '111', '2018-11-07 11:53:51');
COMMIT;

-- ----------------------------
-- Table structure for T_USER_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `T_USER_ROLE`;
CREATE TABLE `T_USER_ROLE` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ROLE_ID` int(11) DEFAULT NULL COMMENT '角色ID',
  `USER_ID` int(11) DEFAULT NULL COMMENT '用户ID',
  `CREATER` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='用户角色中间表';

-- ----------------------------
-- Records of T_USER_ROLE
-- ----------------------------
BEGIN;
INSERT INTO `T_USER_ROLE` VALUES (2, 1, 60, '49', '2018-11-18 18:51:59');
INSERT INTO `T_USER_ROLE` VALUES (3, 2, 51, '49', '2018-11-18 20:13:38');
INSERT INTO `T_USER_ROLE` VALUES (4, 3, 50, '49', '2018-11-18 20:13:43');
INSERT INTO `T_USER_ROLE` VALUES (6, 3, 58, '49', '2018-11-21 09:13:16');
INSERT INTO `T_USER_ROLE` VALUES (7, 3, 57, '49', '2018-11-21 09:13:25');
INSERT INTO `T_USER_ROLE` VALUES (9, 1, 49, '49', '2018-11-22 15:30:34');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
